package com.touzhijia.authority.domain.dto.request;

import com.touzhijia.authority.domain.dto.QueryByPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import java.util.Date;

/**
 * 作者： lzw<br/>
 * 创建时间：2018-03-22 18:12 <br/>
 */
@ApiModel("根据角色查询权限")
@EqualsAndHashCode(callSuper = true)
@Data
public class PermissionQueryByRoleReq extends QueryByPage {

    @ApiModelProperty("角色名称")
    @NotBlank
    private String roleName;

    @ApiModelProperty("模块名称")
    @Length(max = 128)
    private String module;

    @ApiModelProperty("权限标题-like")
    @Length(max = 255)
    private String title;

    @ApiModelProperty("限标识字符串-like")
    @Length(max = 255)
    private String permission;

    @ApiModelProperty("资源类型（1:请求URL地址, 2:其他资源）")
    @Range(min = 1, max = 2)
    private Integer resourcesType;

    @ApiModelProperty("创建时间-开始")
    private Date createStart;

    @ApiModelProperty("创建时间-结束")
    private Date createEnd;
}
